package cn.smart.epic.modular.system.warpper;

import cn.smart.epic.common.constant.factory.ConstantFactory;
import cn.smart.epic.common.warpper.BaseControllerWarpper;
import com.alibaba.fastjson.JSONObject;

import java.util.List;

/**
 * @Auther Uncle_Z
 * @date 2018/8/5 17:16
 * @Email:2545375@qq.com
 * @Descrition
 * @since 1.0
 */

public class UserWarpper extends BaseControllerWarpper {

    public UserWarpper(List<JSONObject> list){
        super(list);
    }

    @Override
    protected void warpTheMap(JSONObject json) {
        json.put("sexName",ConstantFactory.me().getSexName(json.getInteger("sex")));
        json.put("roleName",ConstantFactory.me().getRoleName(json.getString("roleid")));
        json.put("statusName", ConstantFactory.me().getStatusName(json.getInteger("status")));
    }
}
